<?php
Util::tsRegisterAssetJs('maestro.js');
/** @var NiniosCartaNutricionalController $this */
/** @var NiniosCartaNutricional $model */
/** @var AweActiveForm $form */
$this->menu = array(
    array('label' => Yii::t('AweCrud.app', 'Manage'), 'icon' => 'list-alt', 'url' => array('admin')),
//    array('label' => Yii::t('AweCrud.app', 'Manage') . ' ' . NiniosInfoCartasemanal::label().' '.Ninios::label(), 'icon' => 'plus', 'url' => array('admin')),
);

$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
    'id' => 'ninios-carta-nutricional-form',
    'enableAjaxValidation' => false,
    'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false,), // valida en el mismo _ajax
    'enableClientValidation' => true,
        ));
?>
<h2>

</h2>
<div class="row-fluid">
    <div class="span10">
        <?php
        $this->beginWidget('zii.widgets.CPortlet', array(
            'title' => Yii::t('AweCrud.app', 'Asignar').' '. NiniosInfoCartasemanal::label(1) . ' '. Ninios::label(2),
        ));
        ?>
        <div class="row-fluid">
            <div class="span8" style="overflow: auto">
                <?php ($model && Util::checkAccess(array("action_niniosInfoCartaSemanal_ajaxMaestro"))) ? $this->renderPartial('portlets/admin_info_carta_semanal', array('infomodel' => $infomodel)) : NULL; ?>
            </div>
            <div class="span4" style="overflow: auto">  
                <?php ($model && Util::checkAccess(array("action_niniosInfoCartaSemanal_ajaxMaestro"))) ? $this->renderPartial('portlets/admin_ninios', array('submodel' => $submodel)) : NULL; ?>
            </div>
        </div>
        <div class="form-actions">
            <?php
            $this->widget('bootstrap.widgets.TbButton', array(
//                'buttonType' => 'submit',
                'type' => 'primary',
                'htmlOptions' => array('onclick' => 'js:obtenerSelectedGrid()'),
                'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
            ));
            ?>
            <?php
            $this->widget('bootstrap.widgets.TbButton', array(
                //'buttonType'=>'submit',
                'label' => Yii::t('AweCrud.app', 'Cancel'),
                'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
            ));
            ?>
        </div>
        <?php $this->endWidget(); ?>
    </div>
    <?php $this->endWidget(); ?>
    <div class="span2">
        <?php
        $this->beginWidget('zii.widgets.CPortlet', array(
            'title' => 'Operaciones',
        ));
        $this->widget('zii.widgets.CMenu', array(
            'items' => $this->menu,
            'htmlOptions' => array('class' => 'operations'),
        ));
        $this->endWidget();
        ?>

    </div>
</div>